﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApp1
{
    //设床数据
     public class BedSetInfo : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        public void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null == handler)
            {
                return;
            }
            handler(this, new PropertyChangedEventArgs(propertyName));
        }

        private int id = 0;
        public int ID
        {

            get
            {
                return id;
            }
            set
            {
                id = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("ID"));
                }
            }

        }

        //角度
        private int angle = 0;
        public int BedAngle
        {

            get
            {
                return angle;
            }
            set
            {
                angle = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("BedAngle"));
                }
            }

        }


        //床步骤
        private int stepindex = 0;
        public int StepIndex
        {

            get
            {
                return stepindex;
            }
            set
            {
                stepindex = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("StepIndex"));
                }
            }

        }


        //持续时间
        private int duraiton = 0;
        public int Duration
        {

            get
            {
                return duraiton;
            }
            set
            {
                duraiton = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("Duraiton"));
                }
            }

        }

        //时间 索引值
        private int timeindex = 0;
        public int TimeIndex
        {

            get
            {
                return timeindex;
            }
            set
            {
                timeindex = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("TimeIndex"));
                }
            }

        }

        // 当前时间
        private string time = "";
        public string Time
        {

            get
            {
                return time;
            }
            set
            {
                time = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("Time"));
                }
            }

        }




        //运行方向：可扩展 0 静止 ，1 抬起 ，2 降落
        private int direction = 0;
        public int Direction
        {

            get
            {
                return direction;
            }
            set
            {
                direction = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("Direction"));
                }
            }

        }


        // 备注
        private string remark = "";
        public string Remark
        {

            get
            {
                return remark;
            }
            set
            {
                remark = value;
                if (this.PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("Remark"));
                }
            }

        }
    }

    //床通讯数据
    public class BedCommunicatonData 
    {

    }



}
